package app.base.systemmanage.systemmodulesmanage.dao;

import app.base.systemmanage.systemmodulesmanage.model.SysModules;
import app.base.systemmanage.systemmodulesmanage.model.SysModulesExample;
import app.base.systemmanage.systemmodulesmanage.model.SysModulesKey;
import java.util.List;
import java.util.Map;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

public class SysModulesDAOImpl extends SqlMapClientDaoSupport implements SysModulesDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public SysModulesDAOImpl() {
        super();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int countByExample(SysModulesExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("SYS_MODULES.ibatorgenerated_countByExample", example);
        return count.intValue();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int deleteByExample(SysModulesExample example) {
        int rows = getSqlMapClientTemplate().delete("SYS_MODULES.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int deleteByPrimaryKey(SysModulesKey key) {
        int rows = getSqlMapClientTemplate().delete("SYS_MODULES.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public void insert(SysModules record) {
        getSqlMapClientTemplate().insert("SYS_MODULES.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public void insertSelective(SysModules record) {
        getSqlMapClientTemplate().insert("SYS_MODULES.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public List selectByExample(SysModulesExample example) {
        List list = getSqlMapClientTemplate().queryForList("SYS_MODULES.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public SysModules selectByPrimaryKey(SysModulesKey key) {
        SysModules record = (SysModules) getSqlMapClientTemplate().queryForObject("SYS_MODULES.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int updateByExampleSelective(SysModules record, SysModulesExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("SYS_MODULES.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int updateByExample(SysModules record, SysModulesExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("SYS_MODULES.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int updateByPrimaryKeySelective(SysModules record) {
        int rows = getSqlMapClientTemplate().update("SYS_MODULES.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    public int updateByPrimaryKey(SysModules record) {
        int rows = getSqlMapClientTemplate().update("SYS_MODULES.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table SYS_MODULES
     *
     * @ibatorgenerated Wed Jul 15 10:05:01 CST 2009
     */
    private static class UpdateByExampleParms extends SysModulesExample {
        private Object record;

        public UpdateByExampleParms(Object record, SysModulesExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
    
    //
    public void insert_0001(SysModules record) {
        getSqlMapClientTemplate().insert("SYS_MODULES.insert_0001", record);
    }
    
    public int update_0001(SysModules record) {
        int rows = getSqlMapClientTemplate().update("SYS_MODULES.update_0001", record);
        return rows;
    }
    
    public int delete_0001(Map<String, Object> map) {
        int rows = getSqlMapClientTemplate().delete("SYS_MODULES.delete_0001", map);
        return rows;
    }
    
    public List select_0001(Map<String, Object> map)
    {
        List list = getSqlMapClientTemplate().queryForList("SYS_MODULES.select_0001", map);
        return list;    
    }
    
    public List select_0002()
    {
        List list = getSqlMapClientTemplate().queryForList("SYS_MODULES.select_0002", null);
        return list;    
    }
}